package com.generator.web.controller;

import com.generator.api.IDServiceApi;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/id")
@RestController
public class IDServiceController {

    @Resource
    private IDServiceApi idServiceApi;

    @RequestMapping("/nextId.json")
    public Long getNextId() {
        return idServiceApi.nextId();
    }
}
